import 'package:fish_redux/fish_redux.dart';
import 'package:flutter/cupertino.dart' hide Action;
import 'package:flutter/material.dart';
import 'package:www.znpigai.teacher/global_store/state.dart';

import 'list/state.dart';

class SubjectTabState implements GlobalBaseState, Cloneable<SubjectTabState> {
  TabController tabController;
  SubjectListState publicState = SubjectListState()..self = false;
  SubjectListState privateState = SubjectListState()..self = true;
  var tabs = <Widget>[Tab(text: '公共题库'), Tab(text: '我的题库')];
  String typeValue = 'type1';
  String gradeValue = 'grade3';
  bool isPage = false;

  SubjectTabState();

  @override
  SubjectTabState clone() {
    return SubjectTabState()
      ..isPage = isPage
      ..tabController = tabController
      ..publicState = publicState
      ..privateState = privateState
      ..typeValue = typeValue
      ..gradeValue = gradeValue
      ..tabs = tabs;
  }

  @override
  Color themeColor;

  @override
  Map<String, dynamic> userInfo;
}

SubjectTabState initState(Map<String, dynamic> args) {
  var state = SubjectTabState()..isPage = true;
  state.publicState.isSelectable = true;
  state.privateState.isSelectable = true;
  return state;
}
